package com.gopay.common.domain.gsrt;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * 
 * G商融通提现实体类
 * @author zyt
 * @2016年4月19日 @上午10:29:03
 *
 */
@Entity
@Table(name = "GSRT_ACCOUNT_DRAW")
public class GsrtAccountDraw implements java.io.Serializable {
	

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** 
	 * 提现ID
	 */
	private long id;

	/** 
	 * 乐观锁版本号
	 */
	private int version;

	/** 
	 * 网关交易流水
	 */
	private long transDtlSq;

	/** 
	 * 商户订单号
	 */
	private String merOrderId;

	/** 
	 * 商户id
	 */
	private String merCustId;

	/** 
	 * 商户提交时间
	 */
	private Date merTxnTm;

	/** 
	 * 提现金额
	 */
	private BigDecimal merTxnAmt;

	/** 
	 * 订单总手续费
	 */
	private BigDecimal totalOrderFeeAmt;

	/** 
	 * 订单实收手续费
	 */
	private BigDecimal orderRealFeeAmt;

	/** 
	 * 订单总金额
	 */
	private BigDecimal totalOrderAmt;

	/** 
	 * 订单成交金额
	 */
	private BigDecimal orderDealAmt;

	/** 
	 * 币种
	 */
	private String curType;

	/** 
	 * 手续费承担方-------01: 付款方 03：商城
	 */
	private String orderFeePayer;

	/** 
	 * 提现方协议号--------若为空，代表平台提现
	 */
	private String constracterId;

	/** 
	 * 付款方客户ID
	 */
	private String payCustId;

	/** 
	 * 付款方账户
	 */
	private String payAcct;

	/** 
	 * 付款方账户产品代码
	 */
	private String mainPayAcctProdCode;

	/** 
	 * 付款方账户产品名称
	 */
	private String mainPayAcctProdName;

	/** 
	 * 主收款方客户ID
	 */
	private String mainRecvCustId;

	/** 
	 * 主收款方账户
	 */
	private String mainRecvAcct;

	/** 
	 * 主收款账户类型
	 */
	private String mainRecvAcctProdCode;

	/** 
	 * 主收款人账户产品名称
	 */
	private String mainRecvAcctProdName;

	/** 
	 * 国付宝交易日期
	 */
	private Date gopayTxnTm;

	/** 
	 * 国付宝订单号
	 */
	private String gopayOrderId;

	/** 
	 * 关联交易国付宝系统订单号
	 */
	private String relevanceGopayOrderId;

	/** 
	 * 付款渠道
	 */
	private String payChannel;

	/** 
	 * 订单类型
	 */
	private String orderType;

	/** 
	 * 网关通道
	 */
	private String gatewayChannel;

	/** 
	 * 网关来源
	 */
	private String gatewaySource;

	/** 
	 * 创建时间
	 */
	private Date createdTs;

	/** 
	 * 交易状态
	 */
	private int txnStaCd;
	
	/** 
	 * 出款清算单位代码
	 */
    private String outStlmId;
    
    /** 
	 * 出款清算单位账号
	 */
    private String outPayAcct;
    
    /** 
	 * 交易处理完成时间
	 */
    private Date tranFinishTime;
    
    /** 
	 * 订单清算时间
	 */
    private Date orderStlmTime;

	/** 
	 * 交易原因
	 */
	private String commentRk;
	/** 
	 * 交易处理码
	 */
	private int processCode;
	/** 
	 * 冲正标识
	 */
	private int reversalFlag = 100;
	/** 
	 * 商户佣金金额
	 */
    private BigDecimal merCommAmt;
    /** 
	 * 商户佣金承担方
	 */
    private String merCommPayer;
    /** 
	 * 新生--付款方式
	 */
    private String payType;

	/** 
	 * 记录最后修改时间
	 */
	private Date lastUpdTs;

	/** 
	 * 预留字段6
	 */
	private String remark6;

	/** 
	 * 预留字段5
	 */
	private String remark5;

	/** 
	 * 预留字段4
	 */
	private String remark4;

	/** 
	 * 预留字段3
	 */
	private String remark3;

	/** 
	 * 预留字段2
	 */
	private String remark2;

	/** 
	 * 备注
	 */
	private String remark;

	public GsrtAccountDraw() {
	}







	public GsrtAccountDraw(long id, int version, long transDtlSq, String merOrderId, String merCustId, Date merTxnTm,
			BigDecimal merTxnAmt, BigDecimal totalOrderFeeAmt, BigDecimal orderRealFeeAmt, BigDecimal totalOrderAmt,
			BigDecimal orderDealAmt, String curType, String orderFeePayer, String constracterId, String payCustId,
			String payAcct, String mainPayAcctProdCode, String mainPayAcctProdName, String mainRecvCustId,
			String mainRecvAcct, String mainRecvAcctProdCode, String mainRecvAcctProdName, Date gopayTxnTm,
			String gopayOrderId, String relevanceGopayOrderId, String payChannel, String orderType,
			String gatewayChannel, String gatewaySource, Date createdTs, int txnStaCd, String outStlmId,
			String outPayAcct, Date tranFinishTime, Date orderStlmTime, String commentRk, int processCode,
			int reversalFlag, BigDecimal merCommAmt, String merCommPayer, String payType, Date lastUpdTs,
			String remark6, String remark5, String remark4, String remark3, String remark2, String remark) {
		super();
		this.id = id;
		this.version = version;
		this.transDtlSq = transDtlSq;
		this.merOrderId = merOrderId;
		this.merCustId = merCustId;
		this.merTxnTm = merTxnTm;
		this.merTxnAmt = merTxnAmt;
		this.totalOrderFeeAmt = totalOrderFeeAmt;
		this.orderRealFeeAmt = orderRealFeeAmt;
		this.totalOrderAmt = totalOrderAmt;
		this.orderDealAmt = orderDealAmt;
		this.curType = curType;
		this.orderFeePayer = orderFeePayer;
		this.constracterId = constracterId;
		this.payCustId = payCustId;
		this.payAcct = payAcct;
		this.mainPayAcctProdCode = mainPayAcctProdCode;
		this.mainPayAcctProdName = mainPayAcctProdName;
		this.mainRecvCustId = mainRecvCustId;
		this.mainRecvAcct = mainRecvAcct;
		this.mainRecvAcctProdCode = mainRecvAcctProdCode;
		this.mainRecvAcctProdName = mainRecvAcctProdName;
		this.gopayTxnTm = gopayTxnTm;
		this.gopayOrderId = gopayOrderId;
		this.relevanceGopayOrderId = relevanceGopayOrderId;
		this.payChannel = payChannel;
		this.orderType = orderType;
		this.gatewayChannel = gatewayChannel;
		this.gatewaySource = gatewaySource;
		this.createdTs = createdTs;
		this.txnStaCd = txnStaCd;
		this.outStlmId = outStlmId;
		this.outPayAcct = outPayAcct;
		this.tranFinishTime = tranFinishTime;
		this.orderStlmTime = orderStlmTime;
		this.commentRk = commentRk;
		this.processCode = processCode;
		this.reversalFlag = reversalFlag;
		this.merCommAmt = merCommAmt;
		this.merCommPayer = merCommPayer;
		this.payType = payType;
		this.lastUpdTs = lastUpdTs;
		this.remark6 = remark6;
		this.remark5 = remark5;
		this.remark4 = remark4;
		this.remark3 = remark3;
		this.remark2 = remark2;
		this.remark = remark;
	}











	@Id
	@SequenceGenerator(name = "GsrtDrawSequence", sequenceName = "GSRT_ACCOUNT_DRAW_SEQ")
    @GeneratedValue(generator = "GsrtDrawSequence", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Version
	@Column(name = "VERSION", precision = 22, scale = 0)
	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	@Column(name = "TRANS_DTL_SQ", precision = 22, scale = 0)
	public long getTransDtlSq() {
		return this.transDtlSq;
	}

	public void setTransDtlSq(long transDtlSq) {
		this.transDtlSq = transDtlSq;
	}

	@Column(name = "MER_ORDER_ID", nullable = false, length = 30)
	public String getMerOrderId() {
		return this.merOrderId;
	}

	public void setMerOrderId(String merOrderId) {
		this.merOrderId = merOrderId;
	}

	@Column(name = "MER_CUST_ID", nullable = false, length = 10)
	public String getMerCustId() {
		return this.merCustId;
	}

	public void setMerCustId(String merCustId) {
		this.merCustId = merCustId;
	}

	@Column(name = "MER_TXN_TM", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
	public Date getMerTxnTm() {
		return this.merTxnTm;
	}

	public void setMerTxnTm(Date merTxnTm) {
		this.merTxnTm = merTxnTm;
	}

	@Column(name = "MER_TXN_AMT", nullable = false, precision = 20)
	public BigDecimal getMerTxnAmt() {
		return this.merTxnAmt;
	}

	public void setMerTxnAmt(BigDecimal merTxnAmt) {
		this.merTxnAmt = merTxnAmt;
	}

	@Column(name = "TOTAL_ORDER_FEE_AMT", precision = 20)
	public BigDecimal getTotalOrderFeeAmt() {
		return this.totalOrderFeeAmt;
	}

	public void setTotalOrderFeeAmt(BigDecimal totalOrderFeeAmt) {
		this.totalOrderFeeAmt = totalOrderFeeAmt;
	}

	@Column(name = "ORDER_REAL_FEE_AMT", precision = 20)
	public BigDecimal getOrderRealFeeAmt() {
		return this.orderRealFeeAmt;
	}

	public void setOrderRealFeeAmt(BigDecimal orderRealFeeAmt) {
		this.orderRealFeeAmt = orderRealFeeAmt;
	}

	@Column(name = "TOTAL_ORDER_AMT", precision = 20)
	public BigDecimal getTotalOrderAmt() {
		return this.totalOrderAmt;
	}

	public void setTotalOrderAmt(BigDecimal totalOrderAmt) {
		this.totalOrderAmt = totalOrderAmt;
	}

	@Column(name = "ORDER_DEAL_AMT", precision = 20)
	public BigDecimal getOrderDealAmt() {
		return this.orderDealAmt;
	}

	public void setOrderDealAmt(BigDecimal orderDealAmt) {
		this.orderDealAmt = orderDealAmt;
	}

	@Column(name = "CUR_TYPE", length = 3)
	public String getCurType() {
		return this.curType;
	}

	public void setCurType(String curType) {
		this.curType = curType;
	}

	@Column(name = "ORDER_FEE_PAYER", length = 2)
	public String getOrderFeePayer() {
		return this.orderFeePayer;
	}

	public void setOrderFeePayer(String orderFeePayer) {
		this.orderFeePayer = orderFeePayer;
	}

	@Column(name = "CONSTRACTER_ID", length = 14)
	public String getConstracterId() {
		return this.constracterId;
	}

	public void setConstracterId(String constracterId) {
		this.constracterId = constracterId;
	}

	@Column(name = "PAY_CUST_ID", length = 10)
	public String getPayCustId() {
		return this.payCustId;
	}

	public void setPayCustId(String payCustId) {
		this.payCustId = payCustId;
	}

	@Column(name = "PAY_ACCT", length = 19)
	public String getPayAcct() {
		return this.payAcct;
	}

	public void setPayAcct(String payAcct) {
		this.payAcct = payAcct;
	}

	@Column(name = "MAIN_PAY_ACCT_PROD_CODE", length = 10)
	public String getMainPayAcctProdCode() {
		return this.mainPayAcctProdCode;
	}

	public void setMainPayAcctProdCode(String mainPayAcctProdCode) {
		this.mainPayAcctProdCode = mainPayAcctProdCode;
	}

	@Column(name = "MAIN_PAY_ACCT_PROD_NAME", length = 10)
	public String getMainPayAcctProdName() {
		return this.mainPayAcctProdName;
	}

	public void setMainPayAcctProdName(String mainPayAcctProdName) {
		this.mainPayAcctProdName = mainPayAcctProdName;
	}

	@Column(name = "MAIN_RECV_CUST_ID", length = 10)
	public String getMainRecvCustId() {
		return this.mainRecvCustId;
	}

	public void setMainRecvCustId(String mainRecvCustId) {
		this.mainRecvCustId = mainRecvCustId;
	}

	@Column(name = "MAIN_RECV_ACCT", length = 19)
	public String getMainRecvAcct() {
		return this.mainRecvAcct;
	}

	public void setMainRecvAcct(String mainRecvAcct) {
		this.mainRecvAcct = mainRecvAcct;
	}

	@Column(name = "MAIN_RECV_ACCT_PROD_CODE", length = 10)
	public String getMainRecvAcctProdCode() {
		return this.mainRecvAcctProdCode;
	}

	public void setMainRecvAcctProdCode(String mainRecvAcctProdCode) {
		this.mainRecvAcctProdCode = mainRecvAcctProdCode;
	}

	@Column(name = "MAIN_RECV_ACCT_PROD_NAME", length = 10)
	public String getMainRecvAcctProdName() {
		return this.mainRecvAcctProdName;
	}

	public void setMainRecvAcctProdName(String mainRecvAcctProdName) {
		this.mainRecvAcctProdName = mainRecvAcctProdName;
	}

	@Column(name = "GOPAY_TXN_TM")
    @Temporal(TemporalType.TIMESTAMP)
	public Date getGopayTxnTm() {
		return this.gopayTxnTm;
	}

	public void setGopayTxnTm(Date gopayTxnTm) {
		this.gopayTxnTm = gopayTxnTm;
	}

	@Column(name = "GOPAY_ORDER_ID", length = 30)
	public String getGopayOrderId() {
		return this.gopayOrderId;
	}

	public void setGopayOrderId(String gopayOrderId) {
		this.gopayOrderId = gopayOrderId;
	}

	@Column(name = "RELEVANCE_GOPAY_ORDER_ID", length = 30)
	public String getRelevanceGopayOrderId() {
		return this.relevanceGopayOrderId;
	}

	public void setRelevanceGopayOrderId(String relevanceGopayOrderId) {
		this.relevanceGopayOrderId = relevanceGopayOrderId;
	}

	@Column(name = "PAY_CHANNEL", length = 2)
	public String getPayChannel() {
		return this.payChannel;
	}

	public void setPayChannel(String payChannel) {
		this.payChannel = payChannel;
	}

	@Column(name = "ORDER_TYPE", length = 2)
	public String getOrderType() {
		return this.orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	@Column(name = "GATEWAY_CHANNEL", length = 2)
	public String getGatewayChannel() {
		return this.gatewayChannel;
	}

	public void setGatewayChannel(String gatewayChannel) {
		this.gatewayChannel = gatewayChannel;
	}

	@Column(name = "GATEWAY_SOURCE", nullable = false, length = 2)
	public String getGatewaySource() {
		return this.gatewaySource;
	}

	public void setGatewaySource(String gatewaySource) {
		this.gatewaySource = gatewaySource;
	}

	@Column(name = "CREATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
	public Date getCreatedTs() {
		return this.createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name = "TXN_STA_CD", nullable = false, precision = 5, scale = 0)
	public int getTxnStaCd() {
		return this.txnStaCd;
	}

	public void setTxnStaCd(int txnStaCd) {
		this.txnStaCd = txnStaCd;
	}

	@Column(name = "COMMENT_RK", length = 50)
	public String getCommentRk() {
		return this.commentRk;
	}

	public void setCommentRk(String commentRk) {
		this.commentRk = commentRk;
	}

	@Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
	public Date getLastUpdTs() {
		return this.lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "REMARK6", length = 50)
	public String getRemark6() {
		return this.remark6;
	}

	public void setRemark6(String remark6) {
		this.remark6 = remark6;
	}

	@Column(name = "REMARK5", length = 50)
	public String getRemark5() {
		return this.remark5;
	}

	public void setRemark5(String remark5) {
		this.remark5 = remark5;
	}

	@Column(name = "REMARK4", length = 50)
	public String getRemark4() {
		return this.remark4;
	}

	public void setRemark4(String remark4) {
		this.remark4 = remark4;
	}

	@Column(name = "REMARK3", length = 50)
	public String getRemark3() {
		return this.remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	@Column(name = "REMARK2", length = 50)
	public String getRemark2() {
		return this.remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Column(name = "REMARK", length = 90)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "OUT_STLM_ID", length = 10)
	public String getOutStlmId() {
		return this.outStlmId;
	}

	public void setOutStlmId(String outStlmId) {
		this.outStlmId = outStlmId;
	}

	@Column(name = "OUT_PAY_ACCT", length = 30)
	public String getOutPayAcct() {
		return this.outPayAcct;
	}

	public void setOutPayAcct(String outPayAcct) {
		this.outPayAcct = outPayAcct;
	}

	@Column(name = "TRAN_FINISH_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getTranFinishTime() {
		return this.tranFinishTime;
	}

	public void setTranFinishTime(Date tranFinishTime) {
		this.tranFinishTime = tranFinishTime;
	}

	@Column(name = "ORDER_STLM_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getOrderStlmTime() {
		return this.orderStlmTime;
	}

	public void setOrderStlmTime(Date orderStlmTime) {
		this.orderStlmTime = orderStlmTime;
	}

	@Column(name = "REVERSAL_FLAG", length = 3)
    public int getReversalFlag() {
        return reversalFlag;
    }

    public void setReversalFlag(int reversalFlag) {
        this.reversalFlag = reversalFlag;
    }

    @Column(name="MER_COMM_AMT", precision=20, scale=2)
    public BigDecimal getMerCommAmt() {
        return this.merCommAmt;
    }

    public void setMerCommAmt(BigDecimal merCommAmt) {
        this.merCommAmt = merCommAmt;
    }


    @Column(name="MER_COMM_PAYER", length=2)
    public String getMerCommPayer() {
        return this.merCommPayer;
    }

    public void setMerCommPayer(String merCommPayer) {
        this.merCommPayer = merCommPayer;
    }

    @Column(name="PAY_TYPE", length=128)
	public String getPayType() {
		return payType;
	}


	public void setPayType(String payType) {
		this.payType = payType;
	}


	 @Column(name="PROCESS_CODE", length=10)
	public int getProcessCode() {
		return processCode;
	}



	public void setProcessCode(int processCode) {
		this.processCode = processCode;
	}



	@Override
	public String toString() {
		return "GsrtAccountDraw [id=" + id + ", version=" + version + ", transDtlSq=" + transDtlSq + ", merOrderId="
				+ merOrderId + ", merCustId=" + merCustId + ", merTxnTm=" + merTxnTm + ", merTxnAmt=" + merTxnAmt
				+ ", totalOrderFeeAmt=" + totalOrderFeeAmt + ", orderRealFeeAmt=" + orderRealFeeAmt + ", totalOrderAmt="
				+ totalOrderAmt + ", orderDealAmt=" + orderDealAmt + ", curType=" + curType + ", orderFeePayer="
				+ orderFeePayer + ", constracterId=" + constracterId + ", payCustId=" + payCustId + ", payAcct="
				+ payAcct + ", mainPayAcctProdCode=" + mainPayAcctProdCode + ", mainPayAcctProdName="
				+ mainPayAcctProdName + ", mainRecvCustId=" + mainRecvCustId + ", mainRecvAcct=" + mainRecvAcct
				+ ", mainRecvAcctProdCode=" + mainRecvAcctProdCode + ", mainRecvAcctProdName=" + mainRecvAcctProdName
				+ ", gopayTxnTm=" + gopayTxnTm + ", gopayOrderId=" + gopayOrderId + ", relevanceGopayOrderId="
				+ relevanceGopayOrderId + ", payChannel=" + payChannel + ", orderType=" + orderType
				+ ", gatewayChannel=" + gatewayChannel + ", gatewaySource=" + gatewaySource + ", createdTs=" + createdTs
				+ ", txnStaCd=" + txnStaCd + ", outStlmId=" + outStlmId + ", outPayAcct=" + outPayAcct
				+ ", tranFinishTime=" + tranFinishTime + ", orderStlmTime=" + orderStlmTime + ", commentRk=" + commentRk
				+ ", processCode=" + processCode + ", reversalFlag=" + reversalFlag + ", merCommAmt=" + merCommAmt
				+ ", merCommPayer=" + merCommPayer + ", payType=" + payType + ", lastUpdTs=" + lastUpdTs + ", remark6="
				+ remark6 + ", remark5=" + remark5 + ", remark4=" + remark4 + ", remark3=" + remark3 + ", remark2="
				+ remark2 + ", remark=" + remark + "]";
	}







	
	
}
